<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>电子税务局申报历史</title>
    <link rel="stylesheet" href="../../../style/js/layuii/css/layui.css">
    <script src="../../../style/js/layuii/layui.js"></script>
    <script src="../../style/js/jquery-3.2.1.min.js"></script>
</head>
<div style="position:absolute;right:20px;top:5px;z-index: 999">
    <i class="layui-icon" style="color: #36c6de">&#xe702;</i>
    <a href=" " id="sub" onmouseover="show()" onmouseout="onshow()">
        <span style="color: #01C1D1;font-size: 14px">页面帮助</span>
    </a>
</div>
<div id="caoZuoZhiNan" style="display: none;text-align: center">
    <div>
        <p>1.该页面展示每月所有的申报数据</p>
        <p>2.申报月份：本月申报上月的数据信息（<span style="color: red">例</span>：申报月份选择5月，页面回显4月份的申报信息）</p>
        <p>3.申报完成人根据页面<span style="color: red">申报月份</span>进行变更，只回显对应月份的申报人</p>
        <p><span style="color: red">注</span>：因为每月申报的人数不固定。在所选月份没有进行申报的人员该下拉框不会进行回显</p>
    </div>
</div>
<body style="margin: 30px">
<style>
    #verification {
        width: 170px;
        height: 38px;
        padding-left: 10px;
        border: 0;
        border-bottom: 1px solid #9F9F9F;
    }

    #phone-code-login {
        height: 38px;
        border: 0;
        color: #53cac3;
        border-bottom: 1px solid #9F9F9F;
        background-color: #ffffff;
        cursor: pointer;
        margin-left: 10px;
        margin-top: -38px;
        text-align: right;
    }

    .layui-form-selected dl {
        width: 250px;
    }
    .layui-tab-brief > .layui-tab-title .layui-this {
        color: #60c7d0;
    }
    .layui-tab-brief>.layui-tab-more li.layui-this:after, .layui-tab-brief>.layui-tab-title .layui-this:after {
        border: none;
        border-radius: 0;
        border-bottom: 2px solid #60c7d0;
    }
    .layui-layer-btn .layui-layer-btn0 {
        border-color: #36c6de;
        background-color: #36c6de;
        color: #fff;
    }
    .zly-btn {
        /*color: #60c7d0;*/
        font-size: 12px;
        margin-left: 10px;
    }

    .layui-form-checkbox[lay-skin=primary] span {
        padding-left: 30px;
    }

    /*搜索上方高度*/
    .zly-btn-search {
        margin-top: 0;
    }

    /*输入框左侧字体高度*/
    .layui-form-label {
        padding: 2px 15px;
        width: 100px;
    }

    /*输入框弧度*/
    .layui-input, .layui-select, .layui-textarea {
        border-radius: 0px;
    }

    /*下拉框行高度*/
    .layui-form-select dl dd, .layui-form-select dl dt {
        padding: 0 10px;
        line-height: 24px;
    }

    /*下拉框选中颜色*/
    .layui-form-select dl dd.layui-this {
        background-color: #36c6de;
        color: #fff;
    }

    /*下拉框高度*/
    .layui-form-select dl {
        max-height: 140px;
        width: 60px;
    }

    /*下拉框宽度*/
    .layui-form-select .layui-input {
        padding-right: 30px;
        cursor: pointer;
    }

    /*下拉框字体大小*/
    .layui-text {
        line-height: 24px;
        font-size: 12px;
        color: #666;
    }

    /*复选框颜色*/
    .layui-form-checked span, .layui-form-checked:hover span {
        background-color: #36c6de;
    }

    /*复选框字体大小*/
    .layui-form-checkbox span {
        font-size: 12px;
    }

    /*复选框高度*/
    .layui-form-checkbox {
        height: 24px;
        line-height: 24px;
    }

    /*复选框勾选高度大小*/
    .layui-form-checkbox i {
        height: 22px;
        font-size: 16px;
    }

    /*单选框大小*/
    .layui-form-radio > i {
        margin-right: 8px;
        font-size: 14px;
        color: #c2c2c2;
    }

    /*单选框颜色*/
    .layui-form-radio > i:hover, .layui-form-radioed > i {
        color: #36c6de;
    }

    /*单选框高度*/
    .layui-form-radio {
        line-height: 24px;
        margin: 3px 10px;
    }

    /*按钮大小*/
    .layui-btn {
        height: 24px;
        line-height: 24px;
        background-color: #60c7d0;
        font-size: 12px;
        border-radius: 0px;
    }

    /*时间选择器颜色*/
    .layui-laydate .layui-this {
        background-color: #60c7d0 !important;
        color: #fff !important;
    }


    .xs {
        height: 24px;
        color: #36c6d3;
        cursor: pointer;
    }

    .ly-btn-left {
        color: #fff;
        width: 45%;
        border-radius: 20px 0 0 20px;
        height: 30px;
        line-height: 24px;
        font-size: 12px;
        background-color: #36c6de;
        color: beige;
        border-color: #60c7d0;
        text-indent: 8px;
    }

    .ly-btn-right {
        /*color: #fff;*/
        width: 45%;
        border-radius: 0px 20px 20px 0px;
        height: 30px;
        line-height: 24px;
        font-size: 12px;
        /*background-color: #36c6de;*/
        /*color: beige;*/
        /*border-color: #60c7d0;*/
    }

    /*单选框高度*/
    .layui-form-radio {
        line-height: 24px;
        margin: 3px 10px;
    }

    .layui-form-radio * {
        font-size: 12px;
    }

    .layui-form-checkbox span {
        font-size: 12px;
    }

    .layui-form-label {
        float: left;
        display: block;
        padding: 3px 15px;
        width: 80px;
        font-weight: 400;
        line-height: 18px;
        text-align: right;
        font-size: 12px;
    }

    .layui-input, .layui-select, .layui-textarea {
        height: 24px;
        line-height: 1.3;
        line-height: 24px;
        font-size: 12px;
        border-width: 1px;
        border-style: solid;
        background-color: #fff;
    }

    .layui-form-item .layui-form-checkbox[lay-skin=primary] {
        margin: 6px;
    }

    .layui-layer-title {
        font-size: 12px;
    }

    /*选项卡格局*/
    .layui-tab-title li {
        font-size: 12px;
    }

    .layui-layer-dialog .layui-layer-content {
        position: relative;
        padding: 20px;
        line-height: 24px;
        word-break: break-all;
        overflow: hidden;
        font-size: 12px;
        overflow-x: hidden;
        overflow-y: auto;
    }

    body {
        line-height: 24px;
        font: 12px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif;
    }

    .layui-input, .layui-select, .layui-textarea {

        border-radius: 0;
    }

    .layui-elem-field legend {
        margin-left: 20px;
        padding: 0 10px;
        font-size: 14px;
        font-weight: 300;
    }

    .zyl-col {
        position: relative;
        display: inline-block;
        box-sizing: border-box;
    }
    .shenBaoXinXi {
        width: 250px;
    }

    .layui-inline {
        /*margin: 10px 0;*/
    }

    .layui-elem-quote {
        margin-left: 178px;
    }

    .colorrow {
        color: #ff8d90;
    }

    .layui-form-item .layui-inline {
        margin-right: 0;
        margin-top: 10px;
    }

    .layui-form-label {
        font-size: 12px;
    }

    .layui-input {
        font-size: 12px;
    }
    #buChongXinXi .layui-form-label {
        padding: 2px 0px 2px 15px;
        width: 150px;
    }
    .ly_fontsize {
        height: 24px;
        font-size: 12px;
    }

    .layui-input, .layui-select, .layui-textarea {
        height: 24px;
    }

    .layui-btn {
        margin-left: 13px;
    }
    .buChongXinXiDiv{
        border-bottom: solid 1px #60c7d0;
        margin: 0px 10px;
    }
    .textright {
        width: 100px;
        text-align: left;
        padding-left: 5px;
    }

    .textleft {
        color: #C4C4C4;
        padding-right: 0px;
        margin-left: 20px;
        width: 150px;
    }

    #huiXianDiv .layui-form-item {
        margin-bottom: 0px;
        clear: both;
        *zoom: 1;
    }
    #huiXianDiv .layui-inline {
        margin: 0px;
    }
    #shenBaoJiBenSheZhiHuiXianFrom2 .textleft {
        width: 185px;
    }
    #shenBaoJiBenSheZhiHuiXianFrom2 .textright {
        width: 200px;
    }
    .layui-laypage .layui-laypage-curr .layui-laypage-em {
        background-color: #60c7d0;
    }
    blockquote, body, button, dd, div, dl, dt, form, h1, h2, h3, h4, h5, h6, input, li, ol, p, pre, td, textarea, th, ul {
        font-size: 12px;
    }
</style>



<!--页面选项卡-->
<div class="layui-tab layui-tab-brief" lay-filter="test">
    <ul class="layui-tab-title">
        <li class="layui-this" lay-id="11">电子税务局每月申报记录</li>
        <li lay-id="22">个税每月申报记录</li>
    </ul>
    <div class="layui-tab-content">
        <!-- 电子税务局 -->
        <div class="layui-tab-item layui-show">

            <!--电子税务局页面搜索框-->
            <div class="layui-form">
                <div class="layui-row" style="margin-top: 10px">
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width: 130px;margin-top: -12px">申报月份:</label>
                        <div class="layui-input-inline" style="margin-top: -15px;">
                            <input type="text" id="shenBaoYueFen" style="width: 150px;" placeholder="请选择申报日期"
                                   autocomplete="off" readonly=""
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button type="button" class="layui-btn " id="souSuo" lay-submit
                                style="height: 24px;margin-top: -15px;margin-left:25px;width: 100px">
                            <i class="layui-icon"></i>搜&nbsp;&nbsp;索
                        </button>
                    </div>
                </div>
            </div>

            <!--电子税务局页面主表格-->
            <div class="layui-row">
                <table id="shenBaoLiShi_table" lay-filter="shenBaoLiShi_table"></table>
            </div>
        </div>
        <!-- 个税 -->
        <div class="layui-tab-item">
            <!--个税页面搜索框-->
            <div class="layui-form">
                <div class="layui-row" style="margin-top: 10px">
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width: 130px;margin-top: -12px">申报月份:</label>
                        <div class="layui-input-inline" style="margin-top: -15px;">
                            <input type="text" id="shenBaoYueFenGeShui" style="width: 150px;" placeholder="请选择申报日期"
                                   autocomplete="off" readonly=""
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button type="button" class="layui-btn " id="souSuoGeShui" lay-submit
                                style="height: 24px;margin-top: -15px;margin-left:25px;width: 100px">
                            <i class="layui-icon"></i>搜&nbsp;&nbsp;索
                        </button>
                    </div>
                </div>
            </div>

            <!--个税页面主表格-->
            <div class="layui-row">
                <table id="shenBaoLiShiGeShui_table" lay-filter="shenBaoLiShiGeShui_table"></table>
            </div>
        </div>
    </div>
</div>

<!--查看详情-->
<div id="selectGeShuiShenBaoXiangQing" style="display: none;background-color: #f2f4f6;width: 500px;">
    <!--    回显信息-->
    <div style="font-size: 12px">
        <div class="layui-row" style="text-align: left;color: #8B8878;width: 120px;height: 40px;margin-left: 66px;margin-top: -40px">个税申报截图：</div>
        <div class="layui-row" id="geShuiShenBaoTuPian" style="margin: 0 20px 20px 20px;">
            <div id="test1" style="margin-top: 20px;">
                <div class="layui-carousel" id="test10" lay-filter="test10">
                    <div carousel-item id="lunBo">
                    </div>
                </div>
            </div>
        </div>
        <div id="kongTuPian" style="display: none">
            <div style='text-align: center'> 暂无图片 </div>
        </div>
    </div>
</div>


<script type="text/html" id="barDemo">
    <a type="button" class="zly-btn" lay-event="detail" style="color: #60c7d0">查看</a>
</script>
<script type="text/html" id="barDemoShuiJu">
    <a type="button" class="zly-btn" lay-event="detailShuiJu" style="color: #60c7d0">查看</a>
</script>
</body>

<script>
    layui.use(['laydate', 'layer', 'table', 'upload', 'element', 'form', 'util','carousel'], function () {
        var form = layui.form
        var $ = layui.jquery,
            element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块
        var upload = layui.upload;
        var table = layui.table;
        var  laydate = layui.laydate;
        var layer = layui.layer;
        var $ = layui.$;
        var carousel = layui.carousel;

        // 日期格式处理
        layui.laytpl.toDateString = function (d, format) {
            var date = new Date(d || new Date())
                , ymd = [
                this.digit(date.getFullYear(), 4)
                , this.digit(date.getMonth() + 1)
                , this.digit(date.getDate())
            ]
                , hms = [
                this.digit(date.getHours())
                , this.digit(date.getMinutes())
                , this.digit(date.getSeconds())
            ];

            format = format || 'yyyy-MM-dd HH:mm:ss';

            return format.replace(/yyyy/g, ymd[0])
                .replace(/MM/g, ymd[1])
                .replace(/dd/g, ymd[2])
                .replace(/HH/g, hms[0])
                .replace(/mm/g, hms[1])
                .replace(/ss/g, hms[2]);
        };
        //数字前置补零
        layui.laytpl.digit = function (num, length, end) {
            var str = '';
            num = String(num);
            length = length || 2;
            for (var i = num.length; i < length; i++) {
                str += '0';
            }
            return num < Math.pow(10, length) ? str + (num | 0) : num;
        };

        //获取当前日期
        let date = new Date();
        let dateYear = date.getFullYear();    //获取当期年
        let dateMonth = date.getMonth() + 1;  //获取当前月
        let suoShuYue = null;

        if (dateMonth == 0) {
            dateMonth = 12;
            dateYear = dateYear - 1;
        }
        if (dateMonth < 10) {
            //本月日期
            suoShuYue = dateYear + "-0" + dateMonth;
        } else {
            suoShuYue = dateYear + "-" + dateMonth;
        }

        laydate.render({
            elem: '#shenBaoYueFen'
            ,type: 'month'
            // ,value:suoShuYue
            ,done: function(value, date, endDate) {
                var shangYueFen = null;
                var nian = date.year;
                var yue = date.month - 1;
                if (yue == 0) {
                    yue = 12;
                    nian = nian - 1;
                }
                if (yue < 10) {
                    //上月
                    shangYueFen = nian + "-0" + yue;
                } else {
                    shangYueFen = nian + "-" + yue;
                }
            }
        })

        // 页面下拉框搜索（申报成功）
        $('#souSuo').click(function () {
            let shenBaoYueFen = $("#shenBaoYueFen").val();//所属月份yyyy-MM
            if(shenBaoYueFen===null||shenBaoYueFen===""){
                shenBaoYueFen="";
            }else{
                //对月份进行截取，取所选月份的上个月份
                var nianFen = shenBaoYueFen.substring(0,4);
                var yueFen = shenBaoYueFen.substring(5,7);
                let nian = nianFen;
                let yue = yueFen - 1;
                if (yue == 0) {
                    yue = 12;
                    nian = nian - 1;
                }
                if (yue == 13) {
                    yue = 1;
                    nian = nian + 1;
                }
                if (yue < 10) {
                    shenBaoYueFen = nian + "-0" + yue;
                } else {
                    shenBaoYueFen = nian + "-" + yue;
                }
            }
            //主页面表格
            table.reload('shenBaoLiShi_table', {
                url: '/shenBaoGeShuiIndex/selectShenBaoJiLu',
                where: {
                    "shenBaoYueFen": shenBaoYueFen
                }
                ,
                page: {curr: 1}
            });
        });

        laydate.render({
            elem: '#shenBaoYueFenGeShui'
            ,type: 'month'
            // ,value:suoShuYue
            ,done: function(value, date, endDate) {
                var shangYueFen = null;
                var nian = date.year;
                var yue = date.month - 1;
                if (yue == 0) {
                    yue = 12;
                    nian = nian - 1;
                }
                if (yue < 10) {
                    //上月
                    shangYueFen = nian + "-0" + yue;
                } else {
                    shangYueFen = nian + "-" + yue;
                }
            }
        })

        //建造实例
        carousel.render({
            elem: '#test1'
            , width: '100%' //设置容器宽度
            // ,arrow: 'always' //始终显示箭头
            , anim: 'fade' //切换动画方式
        });

        // 页面下拉框搜索（申报成功）
        $('#souSuoGeShui').click(function () {
            let shenBaoYueFenGeShui = $("#shenBaoYueFenGeShui").val();//所属月份yyyy-MM
            if(shenBaoYueFenGeShui===""||shenBaoYueFenGeShui===null){
                shenBaoYueFenGeShui="";
            }else{
                //对月份进行截取，取所选月份的上个月份
                var nianFen = shenBaoYueFenGeShui.substring(0,4);
                var yueFen = shenBaoYueFenGeShui.substring(5,7);
                let nian = nianFen;
                let yue = yueFen - 1;
                if (yue == 0) {
                    yue = 12;
                    nian = nian - 1;
                }
                if (yue == 13) {
                    yue = 1;
                    nian = nian + 1;
                }
                if (yue < 10) {
                    shenBaoYueFenGeShui = nian + "-0" + yue;
                } else {
                    shenBaoYueFenGeShui = nian + "-" + yue;
                }
            }
            //主页面表格
            table.reload('shenBaoLiShiGeShui_table', {
                url: '/shenBaoGeShuiIndex/selectGeShuiShenBaoJiLu',
                where: {
                    "shenBaoYueFenGeShui": shenBaoYueFenGeShui
                }
                ,
                page: {curr: 1}
            });
        });

        //Hash地址的定位
        var layid = location.hash.replace(/^#test=/, '');
        element.tabChange('test', layid);
        // 当选项卡切换时加载对应表格
        element.on('tab(test)', function (elem) {
            switch (elem.index) {
                case 0:
                    // 电子税务局页面主表格
                    table.render({
                        elem: '#shenBaoLiShi_table'
                        , url: '/shenBaoGeShuiIndex/selectShenBaoJiLu'//数据接口
                        , defaultToolbar: []
                        , page: true
                        , cols:
                            [[{title: '序号', fixed: 'left', type: 'numbers', width: "5%"}
                                , {field: 'companyName', align: 'left', title: '客户公司名称'}
                                , {field: 'suoShuYueFen', align: 'left', title: '申报所属月份'}
                                , {
                                    field: 'dianZiShuiWuJuShenBaoZhuangTai',
                                    align: 'left',
                                    title: '电子税务局申报状态',
                                    templet: function (obj) {
                                        if (obj.dianZiShuiWuJuShenBaoZhuangTai == 0) {
                                            return "<span style='color: black'>未申报<span/>";
                                        } else if (obj.dianZiShuiWuJuShenBaoZhuangTai == 1) {
                                            return "<span style='color: orange'>等待申报<span/>";
                                        } else if (obj.dianZiShuiWuJuShenBaoZhuangTai == 2) {
                                            return "<span style='color: #4476A7'>正在申报<span/>";
                                        } else if (obj.dianZiShuiWuJuShenBaoZhuangTai == 3) {
                                            return "<span style='color: green'>无税款申报成功<span/>";
                                        } else if (obj.dianZiShuiWuJuShenBaoZhuangTai == 4) {
                                            return "<span style='color: red'>申报失败<span/>";
                                        } else if (obj.dianZiShuiWuJuShenBaoZhuangTai == 6) {
                                            return "<span style='color: orange'>待扣款<span/>";
                                        } else if (obj.dianZiShuiWuJuShenBaoZhuangTai == 7) {
                                            return "<span style='color: #60c7d0'>已扣款申报成功<span/>";
                                        } else if (obj.dianZiShuiWuJuShenBaoZhuangTai == 8) {
                                            return "<span style='color: #0066FF'>暂不扣款申报成功<span/>";
                                        }
                                    }
                                }, {
                                    field: 'dianZiShuiWuJuShenBaoWanChengTime',
                                    align: 'left',
                                    title: '电子税务局申报完成时间',
                                    templet: function (obj) {
                                        return layui.laytpl.toDateString(obj.dianZiShuiWuJuShenBaoWanChengTime);
                                    }
                                }
                                , {fixed: 'right', width:178, align:'center', title: '操作', toolbar: '#barDemoShuiJu'}
                            ]]
                    });
                    break
                case 1:
                    // 个税页面主表格
                    table.render({
                        elem: '#shenBaoLiShiGeShui_table'
                        , url: '/shenBaoGeShuiIndex/selectGeShuiShenBaoJiLu'//数据接口
                        , defaultToolbar: []
                        , page: true
                        , cols:
                            [[{title: '序号', fixed: 'left', type: 'numbers', width: "5%"}
                                , {field: 'companyName', align: 'left', title: '客户公司名称'}
                                , {field: 'suoShuYueFen', align: 'left', title: '申报所属月份'}
                                , {
                                    field: 'geShuiShenBaoZhuangTai',
                                    align: 'left',
                                    title: '个税申报状态',
                                    templet: function (obj) {
                                        if (obj.geShuiShenBaoZhuangTai == 0) {
                                            return "<span style='color: black'>未申报<span/>";
                                        } else if (obj.geShuiShenBaoZhuangTai == 1) {
                                            return "<span style='color: orange'>等待申报<span/>";
                                        } else if (obj.geShuiShenBaoZhuangTai == 2) {
                                            return "<span style='color: #4476A7'>正在申报<span/>";
                                        } else if (obj.geShuiShenBaoZhuangTai == 3) {
                                            return "<span style='color: green'>申报成功<span/>";
                                        } else if (obj.geShuiShenBaoZhuangTai == 4) {
                                            return "<span style='color: red'>申报失败<span/>";
                                        }
                                    }
                                }, {
                                    field: 'geShuiShenBaoWanChengTime',
                                    align: 'left',
                                    title: '个税申报完成时间',
                                    templet: function (obj) {
                                        return layui.laytpl.toDateString(obj.geShuiShenBaoWanChengTime);
                                    }
                                }
                                , {fixed: 'right', width:178, align:'center', title: '操作', toolbar: '#barDemo'}
                            ]]
                    });
                    break

            }
        })

        // 电子税务局页面主表格
        table.render({
            elem: '#shenBaoLiShi_table'
            , url: '/shenBaoGeShuiIndex/selectShenBaoJiLu'//数据接口
            , defaultToolbar: []
            , page: true
            , cols:
                [[{title: '序号', fixed: 'left', type: 'numbers', width: "5%"}
                    , {field: 'companyName', align: 'left', title: '客户公司名称'}
                    , {field: 'suoShuYueFen', align: 'left', title: '申报所属月份'}
                    , {
                        field: 'dianZiShuiWuJuShenBaoZhuangTai',
                        align: 'left',
                        title: '电子税务局申报状态',
                        templet: function (obj) {
                            if (obj.dianZiShuiWuJuShenBaoZhuangTai == 0) {
                                return "<span style='color: black'>未申报<span/>";
                            } else if (obj.dianZiShuiWuJuShenBaoZhuangTai == 1) {
                                return "<span style='color: orange'>等待申报<span/>";
                            } else if (obj.dianZiShuiWuJuShenBaoZhuangTai == 2) {
                                return "<span style='color: #4476A7'>正在申报<span/>";
                            } else if (obj.dianZiShuiWuJuShenBaoZhuangTai == 3) {
                                return "<span style='color: green'>无税款申报成功<span/>";
                            } else if (obj.dianZiShuiWuJuShenBaoZhuangTai == 4) {
                                return "<span style='color: red'>申报失败<span/>";
                            } else if (obj.dianZiShuiWuJuShenBaoZhuangTai == 6) {
                                return "<span style='color: orange'>待扣款<span/>";
                            } else if (obj.dianZiShuiWuJuShenBaoZhuangTai == 7) {
                                return "<span style='color: #60c7d0'>已扣款申报成功<span/>";
                            } else if (obj.dianZiShuiWuJuShenBaoZhuangTai == 8) {
                                return "<span style='color: #0066FF'>暂不扣款申报成功<span/>";
                            }
                        }
                    }, {
                        field: 'dianZiShuiWuJuShenBaoWanChengTime',
                        align: 'left',
                        title: '电子税务局申报完成时间',
                        templet: function (obj) {
                            return layui.laytpl.toDateString(obj.dianZiShuiWuJuShenBaoWanChengTime);
                        }
                    }
                    , {fixed: 'right', width:178, align:'center', title: '操作', toolbar: '#barDemoShuiJu'}
                ]]
        });
        table.on('tool(shenBaoLiShiGeShui_table)',function(obj){
            console.log(obj.data.zuoZhangShenBaoId)
            if(obj.event==="detail"){
                layer.open({
                    type: 1,
                    anim: 5,
                    offset: 'r',
                    scrollbar: false,
                    title: ['个税申报详细','font-size: 13px'],
                    shade:0.1,
                    shadeClose: true,
                    area: ['510px', '100%'], //宽高
                    content: $('#selectGeShuiShenBaoXiangQing')
                    ,end:function (){
                        $('#selectGeShuiShenBaoXiangQing').css("display","none");
                        // $('#geShuiShenBaoTuPian').html("");
                    }
                })
                $.ajax({
                    url:'/shenBaoGeShuiIndex/selectShenBaoJieTuGeShui',
                    type:'get',
                    data:{
                        "zuoZhangShenBaoId":obj.data.zuoZhangShenBaoId,
                        "suoShuYueFen":obj.data.suoShuYueFen
                    },
                    dataType: 'json',
                    success: function(obj){
                        $("#lunBo").html("")
                        var tuPian = obj.data;
                        console.log(tuPian)
                        if (tuPian!==undefined) {
                            $("#kongTuPian").css("display","none")
                            $("#geShuiShenBaoTuPian").css("display","block")
                            let json = {}
                            json.title = "交接截图";

                            for (let i = 0; i < tuPian.length; i++) {
                                $("#lunBo").append("<div><img layer-src=" + tuPian[i].filePath + "  src=" + tuPian[i].filePath + "  alt='" + tuPian[i].fileName + "'  id='tuPian_" + i + "' style='width: 480px;height: 260px' ></div>")

                                $("#tuPian_" + i).click(function () {

                                    layer.open({
                                        type: 1,
                                        title: false,
                                        closeBtn: 0,
                                        shade: [0.3, '#000'],//黑色背景（0.3代表颜色深度）
                                        shadeClose: true,//点击遮罩关闭大图
                                        area: ['80%', '88%'], //宽高
                                        content: '<img class="Img" style="width: 100%;height: 100%;" src="' + tuPian[i].filePath + '" />'
                                    });

                                    // layer.photos({
                                    //     photos: "#lunBo",
                                    //     offset: ['14px'],
                                    //     anim: 5,//0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
                                    // })
                                })
                            }
                        } else {
                            $("#kongTuPian").css("display","block")
                            $("#geShuiShenBaoTuPian").css("display","none")
                        }
                        //建造实例
                        carousel.render({
                            elem: '#test10'
                            , width: '100%' //设置容器宽度
                            , arrow: 'hover' //始终显示箭头
                        });
                        //触发轮播切换事件
                        carousel.on('change(test10)', function (obj) { //test1来源于对应HTML容器的 lay-filter="test1" 属性值
                            console.log(obj.index); //当前条目的索引
                            console.log(obj.prevIndex); //上一个条目的索引
                            console.log(obj.item); //当前条目的元素对象
                        });
                    }
                })
            }
        })
        table.on('tool(shenBaoLiShi_table)',function(obj){
            console.log(obj.data.zuoZhangShenBaoId)
            if(obj.event==="detailShuiJu"){
                layer.open({
                    type: 1,
                    anim: 5,
                    offset: 'r',
                    scrollbar: false,
                    title: ['税局申报详细','font-size: 13px'],
                    shade:0.1,
                    shadeClose: true,
                    area: ['510px', '100%'], //宽高
                    content: $('#selectGeShuiShenBaoXiangQing')
                    ,end:function (){
                        $('#selectGeShuiShenBaoXiangQing').css("display","none");
                        // $('#geShuiShenBaoTuPian').html("");
                    }
                })
                $.ajax({
                    url:'/shenBaoGeShuiIndex/selectShenBaoJieTuShuiJu',
                    type:'get',
                    data:{
                        "zuoZhangShenBaoId":obj.data.zuoZhangShenBaoId,
                        "suoShuYueFen":obj.data.suoShuYueFen
                    },
                    dataType: 'json',
                    success: function(obj){
                        $("#lunBo").html("")
                        var tuPian = obj.data;
                        console.log(tuPian)
                        if (tuPian!==undefined) {
                            $("#kongTuPian").css("display","none")
                            $("#geShuiShenBaoTuPian").css("display","block")
                            let json = {}
                            json.title = "交接截图";

                            for (let i = 0; i < tuPian.length; i++) {
                                $("#lunBo").append("<div><img layer-src=" + tuPian[i].filePath + "  src=" + tuPian[i].filePath + "  alt='" + tuPian[i].fileName + "'  id='tuPian_" + i + "' style='width: 480px;height: 260px' ></div>")

                                $("#tuPian_" + i).click(function () {
                                    layer.open({
                                        type: 1,
                                        title: false,
                                        closeBtn: 0,
                                        shade: [0.3, '#000'],//黑色背景（0.3代表颜色深度）
                                        shadeClose: true,//点击遮罩关闭大图
                                        area: ['80%', '88%'], //宽高
                                        content: '<img class="Img" style="width: 100%;height: 100%;" src="' + tuPian[i].filePath + '" />'
                                    });

                                    // layer.photos({
                                    //     photos: "#lunBo",
                                    //     offset: ['14px'],
                                    //     anim: 5,//0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
                                    // })
                                })
                            }
                        } else {
                            $("#kongTuPian").css("display","block")
                            $("#geShuiShenBaoTuPian").css("display","none")
                        }
                        //建造实例
                        carousel.render({
                            elem: '#test10'
                            , width: '100%' //设置容器宽度
                            , arrow: 'hover' //始终显示箭头
                        });
                        //触发轮播切换事件
                        carousel.on('change(test10)', function (obj) { //test1来源于对应HTML容器的 lay-filter="test1" 属性值
                            console.log(obj.index); //当前条目的索引
                            console.log(obj.prevIndex); //上一个条目的索引
                            console.log(obj.item); //当前条目的元素对象
                        });
                    }
                })
            }
        })
    })

    function myTime(date) {
        var arr = date.split("T");
        var d = arr[0];
        var darr = d.split('-');

        var t = arr[1];
        var tarr = t.split('.000');
        var marr = tarr[0].split(':');

        var dd = parseInt(darr[0]) + "/" + parseInt(darr[1]) + "/" + parseInt(darr[2]) + " " + parseInt(marr[0]) + ":" + parseInt(marr[1]) + ":" + parseInt(marr[2]);
        return dd;
    }

    // 数字补0操作
    function addZero(num) {
        return num < 10 ? '0' + num : num;
    }

    function formatDateTime(date) {
        var time = new Date(Date.parse(date));
        time.setTime(time.setHours(time.getHours() + 8));
        var Y = time.getFullYear() + '-';
        var M = this.addZero(time.getMonth() + 1) + '-';
        var D = this.addZero(time.getDate()) + ' ';
        var h = this.addZero(time.getHours()) + ':';
        var m = this.addZero(time.getMinutes()) + ':';
        var s = this.addZero(time.getSeconds());
        return Y + M + D + h + m + s;
        // }
    }


    // 页面帮助
    function show() {
        layui.use('table',function () {
            var $ = layui.$;
            layer.tips($("#caoZuoZhiNan").html(), '#sub', {
                tips: [3, 'gray'],
                area: ['auto', 'auto'],
                left: 100,
                time: 0
            })
        })
    }
    function onshow() {
        layer.closeAll()
    }

</script>
</html>